import Mock from 'mockjs'

// var Mock = require('mockjs')
const data = Mock.mock({
    'data|50': [{
        'id|+1': 1,
        name: 'iPhone 11',
        'kind|1': ['男装', '女装', '工装'],
        proname: "@first()",
        desc: '@ctitle'
    }]
})

// console.log(data)

Mock.mock('/getprolist', 'get', () => {
    return data
})

Mock.mock('/getproadd', 'post', (config) => {
    console.log('请求了一个post方式的假地址', JSON.parse(config.body))


    data.data.push(JSON.parse(config.body))

    return data
})